-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(animations): avoid animation insertions during router back/refresh #21977
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please adjust the comment before merging
// there may exist a race condition here (within the router functionality) | ||
// that may end up having DOM nodes be inserted prematurely even though | ||
// the new DOM is not ready just yet. This is a router-level issue, | ||
// however animations should be defensive about this situation (issue #21947) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about:
This if statement is a workaround for router issue #21947.
The router sometimes hits a race condition where while a route is being instantiated a new navigation arrives, triggering leave animation of DOM that has not been fully initialized, until this is resolved, we need to handle the scenario when DOM is not in a consistent state during the animation.
Please check if what I wrote is technically correct and makes sense to you. I found your version to be hard to understand.
You can preview a1e594c at https://pr21977-a1e594c.ngbuilds.io/. |
a1e594c
to
5f80904
Compare
You can preview 5f80904 at https://pr21977-5f80904.ngbuilds.io/. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Closes #19712